/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.put.netbeans.dcs_modeler.wizards.importWorkflowElement;

import java.util.logging.Logger;
import javax.swing.JPanel;

public final class ImportWorkflowElementVisualPanel1 extends JPanel 
{
    
    private String selectedObject;
    /** Creates new form ImportWorkflowElementVisualPanel1 */
    public ImportWorkflowElementVisualPanel1() {
        initComponents();
    }

    @Override
    public String getName() {
        return "Import definiecji obliczeń";
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        computingObject = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();

        jLabel1.setLabelFor(this);
        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, "Wybierz objekt definicji obliczeń. Nowy obiekt możesz zdefiniować wybierając z menu File->New File ");

        computingObject.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 4" }));
        computingObject.setEditor(null);
        computingObject.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                computingObjectPropertyChange(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, "Znalezione elemety: ");

        org.openide.awt.Mnemonics.setLocalizedText(jLabel3, "w kategorii \"DCS Modeler\" pozycję \"obiekt definicji obliczeń\"");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(layout.createSequentialGroup()
                        .add(jLabel2)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(computingObject, 0, 378, Short.MAX_VALUE))
                    .add(jLabel3))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel3)
                .add(48, 48, 48)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2)
                    .add(computingObject, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(157, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void computingObjectPropertyChange (java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_computingObjectPropertyChange
        selectedObject = (String)computingObject.getSelectedItem();
    }//GEN-LAST:event_computingObjectPropertyChange

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox computingObject;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    // End of variables declaration//GEN-END:variables

    public String getSelectedObject()
    {
        return selectedObject;
    }
    
    public void addItemToComputingList( String item )       
    {
        computingObject.addItem( item );
    }

}

